package annotation.bean;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Lookup;


public class Person {


    private String name;


//    @Autowired
    private Cat cat;


    public Cat getCat() {
        return cat;
    }
    @Lookup // 去容器中找
    public void setCat(Cat cat) {
        this.cat = cat;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
